<template>
	<view class="order_card" @click="toDetail">
		<view class="left">
			<image :src="item.cover" mode="" class="cover"></image>
		</view>
		<view class="middle">
			<view class="title">{{item.title}}</view>
			<view class="">支付时间:{{item.time}}</view>
			<view class="price">¥{{item.price}}</view>
			<view class="">共{{item.amount}}件</view>
		</view>
		<view class="right">
			<u-button text="已完成" color="var(--echo-main-color)" class="bottom_btn" size="small" :plain="true"
				shape="circle"></u-button>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				type: Object
			}
		},
		data() {
			return {

			}
		},
		methods: {
			toDetail() {
				this.$emit("toDetail")
			}
		}
	}
</script>

<style scoped lang="scss">
	.order_card {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: 30rpx auto;
		box-sizing: border-box;
		background: rgb(241, 241, 241);
		padding: 30rpx;
		border-radius: 10rpx;

		.left {

			.cover {
				width: 140rpx;
				height: 140rpx;
				border-radius: 10rpx;
			}
		}

		.middle {
			margin-left: 20rpx;
			flex: 1;

			.title {
				font-size: $echo-font-size-title;
				margin-bottom: 6rpx;
			}

			.price {
				font-size: $echo-font-size-title;
			}
		}
	}
</style>
